package core

import "net/http"

type Handler interface {

}

type HttpHandlerInterface interface {
    SetWriter(http.ResponseWriter)
    SetRequest(*http.Request)
    SetPathParams(map[string]string)
    DealErr(error, *HttpReply)
    PreAction() error
}

type HttpHandler struct {
    Writer      http.ResponseWriter
    Request     *http.Request
    PathParams    map[string]string
}

func (this *HttpHandler) SetWriter(w http.ResponseWriter) {
    this.Writer = w
}

func (this *HttpHandler) SetRequest(r *http.Request) {
    this.Request = r
}

func (this *HttpHandler) SetPathParams(params map[string]string) {
    this.PathParams = params
}
